/*
 * @Descripttion: 最后一个字符
 * @Author: ziwei
 * @Date: 2022-09-08 16:54:30
 * @LastEditors: ziwei
 * @LastEditTime: 2022-09-08 17:02:15
 */
export default {}

type LastChar<T,Prev=T> = T extends `${infer L}${infer R}`?LastChar<R,L>:Prev

type A = LastChar<'BFE'>
type B = LastChar<'dev'>
type C = LastChar<''>
type D = LastChar<number>

// type A = '' extends `${infer L}${infer R}`?1:2
// type B = '1' extends `${infer L}${infer R}`?1:2
// type C = '12' extends `${infer L}${infer R}`?1:2

